﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StoneStorage
{
    public class InvalidInvoiceException : Exception
    {
        public MyInvoice Invoice
        {
            get;
            private set;
        }

        public ItemForInvoice Item
        {
            get;
            private set;
        }

        public InvalidInvoiceException(string message)
            : base(message)
        {
        }

        public InvalidInvoiceException(string message, MyInvoice invoice)
            : base(message)
        {
            if (invoice == null)
            {
                throw new ArgumentNullException("invoice");
            }

            this.Invoice = invoice;
        }

        public InvalidInvoiceException(string message, ItemForInvoice item)
            : base(message)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            this.Item = item;
        }
    }
}
